<template>
    <div>
        <push-list-item
            v-for="(item, index) in tableData"
            :key="index"
            :data="item"
        ></push-list-item>

        <empty-list v-if="!tableData.length">
            <span>暂无数据</span>
        </empty-list>
    </div>
</template>

<script>
import pushListItem from '../components/push-list-item';
import EmptyList from '@components/sys/empty-list';

export default {
    components: {
        pushListItem,
        EmptyList,
    },
    data() {
        return {
            tableData: []
        }
    },
    methods: {
        queryData() {
            this.$get(`${this.$store.state.api.tbUrl}/document/hotlist.json`, {
                limit: 6,
                documentguid: this.$route.params.guid,
            }, data => {
                this.tableData = data || [];
            });
        },
    },
    mounted() {
        this.queryData();
    },
};
</script>

<style lang="scss" scoped>
    
</style>